CC=g++
CFLAGS=-Wall
LDFLAGS= -lpthread
SOURCEDIR=source
INCLUDEDIR=include
BINDIR=bin
EXECUTABLE=$(BINDIR)/Sensor
RUNSCRIPT=run.sh

LIBS=-lboost_system -L/home/sameer/BOOST_INSTALL/lib
INC=-I./include -I../common -I/home/sameer/BOOST_INSTALL/include


SOURCES := $(wildcard $(SOURCEDIR)/*.cpp)
HEADERS	:= $(wildcard $(INCLUDEDIR)/*.h*)
COMMONS := $(wildcard ../common/*.h*)


all: $(EXECUTABLE)

$(EXECUTABLE):$(SOURCES) $(HEADERS) $(COMMONS)
	$(CC) $(CFLAGS) $(SOURCES) $(INC) $(LIBS)  -o $@

clean:
	rm -f $(EXECUTABLE)

run: $(EXECUTABLE)
	sh $(RUNSCRIPT)
	
 
